package com.zengqingfa.juc.n3;

import lombok.extern.slf4j.Slf4j;

/**
 * @author zengqingfa
 * @className TestThread
 * @description
 * @create 2021/6/6 10:19
 */
@Slf4j(topic = "c.TestThread")
public class TestThread {

    public static void main(String[] args) {
        new Thread(() -> {
            while (true) {
                try {
                    Thread.sleep(100);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }, "t1").start();

        new Thread(() -> {
            while (true) {
                try {
                    Thread.sleep(100);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }, "t2").start();
    }
}